//
//  PlanItemCell.m
//  Water
//
//  Created by yh on 2017/11/27.
//  Copyright © 2017年 chenguibang. All rights reserved.
//

#import "PlanItemCell.h"
#import <NSDate+YYAdd.h>
#import <NSDate+JKExtension.h>
@implementation PlanItemCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)changeRemaid:(UISwitch *)sender {
    if (self.delegate) {
        [self.delegate planItemCell:self didSwitch:sender isSelect:sender.on model:self.model];
    }
}

- (void)setModel:(PlanItem *)model{
    _model = model;
    self.switchBtn.on = model.isRemind;
    self.timeLabel.text = [NSString stringWithFormat:@"%ld:%ld",model.time.hour,model.time.minute];
    self.tipsLabel.text = model.tag;
}

@end
